﻿@model SuCasa.Models.CourseViewModel

@{
    ViewBag.Title = "Add";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="page-header">
	<h2>Add</h2>
</div>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>CourseViewModel</legend>

        <div class="control-group">
            <label class="control-label">Name</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.Name, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.Name)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">Semester</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.Semester, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.Semester)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">Location</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.Location, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.Location)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">Description</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.Description, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.Description)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">ScheduleNotes</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.ScheduleNotes, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.ScheduleNotes)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">MinimumAge</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.MinimumAge, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.MinimumAge)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">MaximumAge</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.MaximumAge, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.MaximumAge)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">Capacity</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.Capacity, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.Capacity)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">IsDaycare</label>
	    <div class="controls">
          
				@Html.EditorFor(model => model.IsDaycare, new { @class="input-xlarge" })
				@Html.ValidationMessageFor(model => model.IsDaycare)
			</div>
		</div>

        <div class="control-group">
            <label class="control-label">Instructor</label>
            <div class="controls">
                @Html.DropDownListFor(x => x.InstructorId, new SelectList(Model.Instructors, "MemberId", "Name"))
                @Html.ValidationMessageFor(model => model.InstructorId)
            </div>
        </div>
        <input style="display:none;" value="@Model.CourseId" name="CourseId"/>

		<div class="form-actions">
			<input type="submit" class="btn btn-primary" value="Create" />
		</div>
    </fieldset>
}

<div>
	@Html.ActionLink("Back to List", "Index", "Home")
</div>

